# coding: utf-8
from . import db, BaseModel


class UserCounselor(db.Model):
    __tablename__ = 'user_counselor'

    auto_id = db.Column(db.BigInteger, primary_key=True, info='自增id')
    user_id = db.Column(db.String(20), nullable=False, info='用户ID')
    name = db.Column(db.String(50), info='名字')
    gender = db.Column(db.Integer, info='性别: 1-男 ; 2-女')
    mobile = db.Column(db.String(30), info='手机号')
    email = db.Column(db.String(100), info='邮箱')
    address = db.Column(db.String(100), info='地址')
    level = db.Column(db.Integer, nullable=True, server_default=db.FetchedValue(), info='咨询师等级')
    workplace = db.Column(db.String(100), info='工作地址')
    tag = db.Column(db.String(255), info='擅长领域')
    certificate = db.Column(db.String(255), nullable=False, info='心理咨询师资格证号')
    status = db.Column(db.Integer, nullable=False, server_default='0', info='咨询师状态: 0-待审核 1-审核通过 2-审核不通过')
    is_recommend = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue(), info='推荐位')
    is_delete = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue(), info='逻辑删除')
    create_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue(), info='创建时间')
    update_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue(), info='更新时间')